package com.example.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Auther: LIJingQi
 * @Description: nacospeizh
 * @Date: 2022/6/12 22:19
 */
@RestController
@RequestMapping("/nacos")
@Component
//@RefreshScope
public class NacosConfigController {
    @Value("${java123.name:asd}")
    private  String name;
    @Value("${java123.age:asd}")
    private  String age;
    @GetMapping("/getConig")
    public String getConfig(){
        return name+" "+age;
    }
}
